from django.db import models

# Create your models here.
from common.general_class import BaseModel

WAIT_SENDER = 0
SEND_SUCCESS = 1
SEND_FAIL = 2
SENDER_STATUS = [
    (WAIT_SENDER, "未上传"),
    (SEND_SUCCESS, "上传成功"),
    (SEND_FAIL, "上传失败")
]


class SenderHistory(BaseModel):
    file = models.ForeignKey("av_editor.MaterialFile", db_constraint=False, on_delete=models.DO_NOTHING,
                             verbose_name="文件")
    sender_plat = models.ForeignKey("av_manager.PlatForm", db_constraint=False, on_delete=models.DO_NOTHING,
                                    verbose_name="上传平台")
    status = models.SmallIntegerField(verbose_name="状态", choices=SENDER_STATUS, default=WAIT_SENDER)
    video_id = models.CharField(max_length=32, blank=True, null=True, verbose_name="视频id")
    # spy_on = models.BooleanField(default=False, verbose_name="是否监控")
